<template>
    <div>
        <h2>子组件</h2>
        <h2>{{ count }}</h2>
    </div>
</template>

<script setup>
import { ref } from 'vue';

const count = ref(100);
const name = ref('张三');

function setCount() {
    count.value++;
}

defineExpose({
    count,
    name,
    setCount
})
</script>

<style scoped></style>